package com.iscreen.dbupgrade.queries.mysql;

import com.iscreen.dbupgrade.queries.ShowTableQuery;
import com.iscreen.dbupgrade.queries.constants.DBConstants;
import com.iscreen.dbupgrade.queries.constants.mysql.MySqlDBConstants;
import com.iscreen.utils.db.DBUtils;

public class MySqlShowTable extends ShowTableQuery
{

	protected MySqlShowTable(String tableName)
	{
		super(tableName);
	}

	@Override
	public String getSql()
	{
		StringBuilder sqlBuilder = new StringBuilder();
		sqlBuilder.append(MySqlDBConstants.SHOW_TABLES + " ");
		sqlBuilder.append(DBConstants.LIKE + " '"
				+ DBUtils.getQuotedString(tableName) + "'");
		return sqlBuilder.toString();
	}

}
